package com.xyz.properties;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by sunny on 2016/12/18.
 * 通过spring-boot解析配置文件对象
 */
@RestController
public class MainController {
    @Autowired
    PersonProperties personProperties;

    @RequestMapping(method = RequestMethod.GET, value = "properties")
    private String say() {
        return personProperties.getName();
    }
}
